package com.itcast.springboot.service;

import com.itcast.springboot.bean.GiveLike;
import com.itcast.springboot.bean.InsertGiveLike;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GiveLikeService {
    //增
    public InsertGiveLike insertLike(GiveLike like);

    //删
    public InsertGiveLike deleteLike(Integer udid, String uid);

    //查
    public GiveLike getLikeById(Integer lid);

    //多个count查询：多个用户动态id查询对应点赞人数
    public List<Integer> getLikeNumsByUserDynaIds(List<Integer> udids);

    //判断是否已为该用户动态点赞
    public List<String> isLikeByUdids(String uid, List<Integer> udids);

    //级联查询：多个用户动态id查询点赞用户信息
    public List<GiveLike> getLikesAndUsersByUserDynasId(List<Integer> udids);

    //多个用户动态id获取点赞详细信息
    public List<GiveLike> getGiveLikesAndNamesByIds(List<Integer> udids);

    //改
    public Integer updateLike(GiveLike like);
}
